<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    var arr = [];
    arr['a'] = 1;
    arr['b'] = 2;
    console.log(arr);
    console.log(arr.length);
    var arr2 = [];
    arr2[0] = 1;
    arr2[1] = 2;
    console.log(arr2);
    console.log(arr2.length);



    //九九乘法表
    document.write("<table style='border: 1px solid black;'>");
    for (var i = 1; i <= 9; i++) {
        document.write("<tr>");
        for (var j = 1; j <= i; j++) {
            document.write("<td style='border: 1px solid black;'>");
            document.write(i + "x" + j + "=" + i*j);
            document.write("</td>");
        }
        document.write("</tr>");
    }
    document.write("</table>");
</script>
</body>
</html>